<?php
namespace app\index\controller;

use app\index\BaseController;
use think\facade\Db;
use think\facade\View;
use GuzzleHttp\Client;

class Index extends BaseController
{

    /**
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function index()
    {
        $res = Db::name('test')
            -> where([
//                'name' => 'liuyexing'
            ])
            -> select();

        foreach ($res as $v){
            dump($v['name']);
        }
        echo 123;//你好，我是刘也行
    }

    public function hello($name = 'ThinkPHP6')
    {
        return 'hello,' . $name;
    }
}
